Image coding apparatus

ABSTRACT

An image coding technique for suppressing degradation in image quality, in which the time and space where intra macroblocks appear are dispersed. A block count determination part determines the number of intra macroblocks to be allocated in each frame. A position determination part arranges the intra macroblocks at random positions in each frame. A coding part performs coding on the basis of the number of intra macroblocks to be allocated in a time direction, which is determined by the block count determination part, and the arrangement of the intra macroblocks in a spatial direction, which is determined by the position determination part, to thereby output compressed image data.

TECHNICAL FIELD

The present invention relates to an apparatus for coding images togenerate compressed images, and more particularly to an apparatus whichuses an intra coding process and an inter coding process to code images.

BACKGROUND ART

In image coding techniques such as MPEG2, H.264, and the like, an intracoding process and an inter coding process are used. In the intra codingprocess, coding is completed within a frame to be coded, without usingany reference frames. In the inter coding process, coding for a frame tobe coded is performed by using one or more reference frames.

All macroblocks included in an I picture are coded by the intra codingprocess. Macroblocks included in a P picture and a B picture are codedby the inter coding process. Since all the macroblocks in the I pictureare intra-coded, the amount of generated codes in the I picture islarger than that in the P picture or the B picture. Even in the H.264where an intra prediction technique is used, the amount of generatedcodes in the I picture is still larger than that in the P picture or theB picture.

In a system in which low-delay reproduction or transmission is required,an increase in the amount of generated codes in the I picture becomes aproblem. Further, there is another problem that the amount of generatedcodes oscillates in a cycle of appearance of the I picture. When theamount of generated codes oscillates, a larger buffer size istemporarily needed, which is inefficient.

PRIOR-ART DOCUMENTS

-   [Patent Document 1] Japanese Patent Application Laid Open Gazette    No. 2004-215252-   [Non-Patent Document 1] Technical Guide for MPEG technologies in the    homepage of Pioneer Corporation, searched on Dec. 10, 2009, <URL:    http://pioneer.jp/crdl/tech/mpeg/3-2.html>-   [Non-Patent Document 2] Reference Room in the homepage of Japan    Patent Office, searched on Dec. 10, 2009, <URL:    http://www.jpo.go.jp/shiryou/s_sonota/hyoujun_gijutsu/nle/nle-7-1.html>

As discussed above, a compressed image data including an I picture inwhich all macroblocks in a frame are intra-coded is not appropriate fora low-delay system since there is a possibility of causing a delay inthe processing of the I picture. Then, proposed is a coding method shownin Non-Patent Document 1.

In Non-Patent Document 1, no I picture in which all macroblocks in aframe are intra-coded is used. In Non-Patent Document 1, intramacroblocks are arranged on a slice-by-slice basis. All macroblocks in aslice within a frame are coded as intra macroblocks to be directlysubjected to DCT without using any prediction. Such a slice is termed an“intraslice”. By shifting a place to which the intraslice is applied ona frame-by-frame basis, the intraslice makes the rounds of the wholescreen in a certain cycle and the screen is thereby refreshed. Since theamount of generated codes required for the intraslice is smaller thanthat required for the I picture, it is possible to reduce the buffersize and decrease the delay.

Also in Non-Patent Document 2, similarly, disclosed is a technique usingthe intraslice.

As shown in Non-Patent Documents 1 and 2, with the intraslice, it ispossible to disperse intrablocks in a GOP (Group of Pictures).

This method, however, in which all the macroblocks in a slice areintra-coded and the position of the intraslice is shifted by one row ona frame-by-frame basis, causes degradation in image quality.Specifically, when images are reproduced in series, the intraslicesdisadvantageously appear like scan lines.

In the above-discussed Patent Document 1, the intra macroblocks aredispersed on a macroblock-by-macroblock basis. Even in a case using thetechnique shown in Patent Document 1, since the intra macroblocks aremoved at certain intervals, the positions of the intra macroblocks aredisadvantageously noticeable.

DISCLOSURE OF INVENTION

The present invention is intended for an image coding apparatus.According to an aspect of the present invention, the image codingapparatus comprises a block count determination part for determining thenumber of intra macroblocks to be included in each frame, a positiondetermination part for determining respective spatial positions of theintra macroblocks to be included in each frame in the frame, and acoding part for arranging the intra macroblocks, the number of which isdetermined by the block count determination part, in each frame on thebasis of the positions determined by the position determination part, tothereby perform coding. The position determination part arranges theintra macroblocks to be included in each frame at random positions inthe frame.

By using the image coding apparatus of the present invention, the intramacroblocks are dispersed in a time direction. This technique isadaptable to a low-delay system. Further, it is possible to reduce thebuffer size.

By using the image coding apparatus of the present invention, the intramacroblocks can be arranged at random in a spatial direction. Theboundaries of the intra macroblocks thereby become unnoticeable and itis therefore possible to improve the image quality.

According to another aspect of the present invention, the image codingapparatus comprises a position determination part for determiningrespective spatial positions of intra macroblocks to be included in eachframe in the frame; and a coding part for arranging the intramacroblocks in each frame on the basis of the positions determined bythe position determination part, to thereby perform coding. The positiondetermination part arranges the intra macroblocks so that there is adifference in the motion of the intra macroblocks in a time directionbetween even-numbered frames and odd-numbered frames.

Therefore, it is an object of the present invention to provide an imagecoding technique for suppressing degradation in image quality, in whichthe time and space where the intra macroblocks appear are dispersed.

These and other objects, features, aspects and advantages of the presentinvention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing an image coding apparatus;

FIG. 2 is a view showing a frame image consisting of macroblocks M0 toM23;

FIG. 3 is a view showing patterns for the number of macroblocks to beallocated in a time direction;

FIG. 4 is a view showing a number row L1 for macroblocks and a numberrow L2 for shuffled macroblocks;

FIG. 5 is a view showing block numbers of macroblocks to be intra-codedin each of frames;

FIG. 6 is a view showing a spatial arrangement of the intra macroblocksin each of the frames;

FIG. 7 is a view showing a frame number of the frame in which eachmacroblock is to be intra-coded;

FIG. 8 is a view showing the number of allocated macroblocks to beintra-coded in each of the frames;

FIG. 9A is a view showing an exemplary arrangement of intra macroblocks,which is achieved by using a function;

FIG. 9B is a view showing another exemplary arrangement of intramacroblocks, which is achieved by using a function;

FIG. 9C is a view showing still another exemplary arrangement of intramacroblocks, which is achieved by using a function;

FIG. 9D is a view showing yet another exemplary arrangement of intramacroblocks, which is achieved by using a function; and

FIG. 9E is a view showing a further exemplary arrangement of intramacroblocks, which is achieved by using a function.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, with reference to figures, discussion will be made on imagecoding apparatuses of the preferred embodiments of the presentinvention.

The First Preferred Embodiment Constitution of Image Coding Apparatus

FIG. 1 is a block diagram showing an image coding apparatus 1 inaccordance with a first preferred embodiment. The image coding apparatus1 comprises a coding part 11, a block count determination part 12, and aposition determination part 13.

The coding part 11 receives uncompressed image data 21. The coding part11 performs an image coding process on the received uncompressed imagedata 21, to thereby output compressed image data 22. The coding part 11performs the image coding process using a coding system such as MPEG2,H.264, or the like.

The block count determination part 12 determines the number of intramacroblocks to be allocated to each frame. The image coding apparatus 1of the first preferred embodiment does not use any I picture in whichall macroblocks are intra-coded. The image coding apparatus 1 of thefirst preferred embodiment arranges the intra macroblocks dispersedly ina time direction. The block count determination part 12 determinesallocation of the intra macroblocks in the time direction. The blockcount determination part 12 arranges the intra macroblocks so that allthe macroblocks in a frame may be intra-coded once within a refreshcycle. A group of images in the refresh cycle corresponds to one GOP(Group of Pictures).

The position determination part 13 determines respective positions ofthe intra macroblocks in a spatial direction in each frame. The positiondetermination part 13 arranges the intra macroblocks in each frame sothat all the macroblocks in one frame may be intra-coded once within therefresh cycle.

<Processing of Block Count Determination Part>

Now, detailed discussion will be made on processing performed in theblock count determination part 12. As discussed above, the block countdetermination part 12 determines the number of intra macroblocks to beallocated to each frame. Herein, as shown in FIG. 2, a case where oneframe consists of twenty-four macroblocks M0 to M23 is taken as anexample. One frame consists of six macroblocks wide and four macroblockslong. In this case, discussion will be made assuming that the refreshcycle corresponds to ten frames. In other words, during the elapse often frames, all the macroblocks M0 to M23 need to be intra-coded once.

The block count determination part 12 allocates timings at which thetwenty-four macroblocks are intra-coded so that the timings may bedispersed as evenly as possible in the ten frames. First, the blockcount determination part 12 divides the number M of macroblocks in oneframe by the number N of frames in the refresh cycle, as expressed bythe following Eq. 1.

M/N=S . . . R  (Eq. 1)

In Eq. 1, S is the quotient of M divided by N and R is the remainder. M,N, S, and R are all positive integers. R is an integer smaller than N.In the exemplary case discussed herein, Eq. 1 can be expressed by thefollowing Eq. 2.

24/10=2 . . . 4  (Eq. 2)

By performing the arithmetic operation of Eq. 2, the block countdetermination part 12 first determines to allocate two intra macroblocksto each of all the frames. The block count determination part 12 furtherevenly allocates the remaining four intra macroblocks within the refreshcycle.

In general, by performing the arithmetic operation of Eq. 1, the blockcount determination part 12 first determines to allocate S intramacroblocks to each of all the frames. The block count determinationpart 12 further evenly allocates the remaining R intra macroblockswithin the refresh cycle. When the remainder R is 0, processing iscompleted by allocating S intra macroblocks to each of all the frames.

Next, the block count determination part 12 divides the number N offrames in the refresh cycle by the remainder R, as expressed by thefollowing Eq. 3.

N/R=D . . . Q  (Eq. 3)

In Eq. 3, D is the quotient of N divided by R and Q is the remainder. Dis a positive integer. Q is a positive integer smaller than R. In theexemplary case discussed herein, Eq. 3 can be expressed by the followingEq. 4.

10/4=2 . . . 2  (Eq. 4)

By performing the arithmetic operation of Eq. 4, the block countdetermination part 12 determines to dispersedly dispose two of theremaining four intra macroblocks at an interval of two frames and theother two of the remaining four intra macroblocks at an interval ofthree frames.

In general, by performing the arithmetic operation of Eq. 3, the blockcount determination part 12 determines to dispersedly dispose (R−Q) ofthe remaining R intra macroblocks at an interval of D frames and Q ofthe remaining R intra macroblocks at an interval of (D+1) frames. Whenthe remainder Q is 0, processing is completed by allocating R intramacroblocks at an interval of D frames.

By performing the above arithmetic operations, the block countdetermination part 12 determines allocation on the basis of thefollowing standard rules.

(Standard Rule 1) When R is 0, S intra macroblocks are allocated to eachof all the frames.(Standard Rule 2) When R is not 0 and Q is 0, S intra macroblocks areallocated to each of all the frames and each of R intra macroblocks isfurther dispersedly disposed at an interval of D frames. Specifically, Sintra macroblocks are disposed in (N−R) frames and (S+1) intramacroblocks are disposed in dispersed R frames.(Standard Rule 3) When R is not 0 and Q is not 0, S intra macroblocksare first allocated to each of all the frames. Further, (R−Q) of theremaining R intra macroblocks are dispersedly disposed at an interval ofD frames and Q of the remaining R intra macroblocks are dispersedlydisposed at an interval of (D+1) frames. Specifically, when R is not 0and Q is not 0, the block count determination part 12 allocates (S+1)intra macroblocks to each of (R−Q) frames which are disposed at aninterval of D frames and Q frames which are disposed at an interval of(D+1) frames and allocates S intra macroblocks to each of the remaining(N−R) frames.

Thus, in the first preferred embodiment, the block count determinationpart 12 arranges the macroblocks dispersedly in the time direction, andsince S or (S+1) intra macroblocks are disposed in each of the frames,the difference in the number of intra macroblocks to be allocated toeach frame among all the frames is at most one. Further, since theframes each including (S+1) intra macroblocks are disposed at aninterval of D frames or (D+1) frames, the difference in the frameinterval is at most one.

FIG. 3 shows arrangement patterns of the intra macroblocks. FIG. 3 showsthe number of intra macroblocks allocated to each of ten frames F0 toF9. In FIG. 3, Cases 1, 2, and 4 do not conform to the above StandardRule 3. As discussed above, the frames each including (S+1) intramacroblocks are disposed at an interval of D frames or (D+1) frames andthe difference in the frame interval is at most one. Cases 1 and 2largely fall outside this condition. In Case 4, from FIG. 3, the frameseach including three intra macroblocks appears to be evenly disposed.Since the frame F0 follows the frame F9, however, the frames eachincluding three intra macroblocks consecutively appear and thereforeCase 4 does not conform to this condition for the same reason as thatfor Cases 1 and 2.

Cases 3, 5, and 6 satisfies the above Standard Rule 3. In Case 3,however, the frames each including three intra macroblocks areconcentrated in the frames F0 to F4. The block count determination part12 determines Cases 5 and 6 as allocation patterns of the intramacroblocks in accordance with the following algorithm.

As discussed above, the frames each including (S+1) intra macroblocksinclude those which are disposed at an interval of D frames and thosewhich are disposed at an interval of (D+1) frames. The block countdetermination part 12 dispersedly disposes the frames each including(S+1) intra macroblocks so that the (D+1) frame interval may be disposedas evenly as possible in the time direction. It is assumed herein thateach of those which are disposed at an interval of (D+1) frames amongthe frames each including (S+1) intra macroblocks is referred to as a“frame A” and each of those which are disposed at an interval of Dframes is referred to as a “frame B”. In FIG. 3, the frame A and theframe B are indicated distinguishably in Cases 3, 5, and 6. The blockcount determination part 12 disposes the frames A so that the dispersionin the distance between one frame A and another frame A may be as smallas possible. In accordance with this algorithm, Case 3 in whichvariation in the distance between the frames A is large is excluded. Anyone of Cases 5 and 6 may be selected. The block count determination part12 can take, for example, a rule that the D frame interval is firstdisposed. In this case, Case 6 is selected.

<Processing of Position Determination Part>

Next, discussion will be made on processing performed in the positiondetermination part 13. As discussed above, the position determinationpart 13 determines respective positions of intra macroblocks in a framein the spatial direction. The position determination part 13 firstshuffles a row of macroblock numbers by using random numbers, to therebygenerate a new row of macroblock numbers. As shown in FIG. 2, themacroblocks are given numbers from M0 to M23 from the upper left of aframe toward the lower right. The position determination part 13shuffles a number row L1 for the macroblocks, in which the numbers arearranged in order from M0 to M23, by using the random numbers andgenerates such a new number row L2 for the macroblocks as shown in FIG.4.

The position determination part 13 next determines the macroblocks to beintra-coded in each frame in accordance with the number of intramacroblocks in each frame which is determined by the block countdetermination part 12, as shown in FIG. 5.

In the above-discussed exemplary case, the block count determinationpart 12 selects Case 6 in FIG. 3. Specifically, the respective numbersof intra macroblocks in the frames numbered in order of F0, F1, F2 . . ., F9 are determined to be 3, 2, 3, 2, 2, 3, 2, 3, 2, and 2. The positiondetermination part 13 determines the first three macroblocks in thenumber row L2 as the macroblocks to be intra-coded in the frame F0.Subsequently, the position determination part 13 determines the 4-th and5-th macroblocks in the number row L2 as the macroblocks to beintra-coded in the frame F1. Further subsequently, the positiondetermination part 13 determines the 6-th to 8-th macroblocks in thenumber row L2 as the macroblocks to be intra-coded in the frame F2.Thus, the respective positions of the macroblocks to be intra-coded ineach of all the frames are determined.

FIG. 6 shows the respective positions of the macroblocks to beintra-coded in each of all the frames. In FIG. 6, the hatchedmacroblocks are macroblocks to be intra-coded. It can be seen that theintra macroblocks are irregularly arranged in each frame. It can be alsoseen that the number of intra macroblocks are arranged in a balancedmanner in the time direction.

FIG. 7 is a view showing in which frame each macroblock in a frame is tobe intra-coded. The matrix of FIG. 7 corresponds to that of FIG. 2.Specifically, it is found that the macroblock M0 in FIG. 2 is to beintra-coded in the frame F2 as shown in FIG. 7. It is also found thatthe macroblock M8 in FIG. 2 is to be intra-coded in the frame F7 asshown in FIG. 7.

<Coding Process>

Referring back to FIG. 1, the coding part 11 codes the uncompressedimage data 21 on the basis of the allocation of the macroblocks in thetime direction, which is determined by the block count determinationpart 12, and the arrangement of the macroblocks in the spatialdirection, which is determined by the position determination part 13.The coding part 11 outputs the compressed image data 22 after coding.

In the compressed image data 22 generated by the image coding apparatus1 of the first preferred embodiment, as discussed above, the intramacroblocks are randomly arranged in each frame. Since there is noregularity in the arrangement of the intra macroblocks in the spatialdirection, the boundary between the intra macroblocks and the intermacroblocks become unnoticeable. This avoids the degradation in imagequality due to clear difference in image quality, unlike the case usingthe intraslice. Further, it is possible to solve the problem that thespatial positions of the intra macroblocks are regularly moved and thiscauses the intra macroblocks to be noticeable.

Furthermore, in the compressed image data 22 generated by the imagecoding apparatus 1 of the first preferred embodiment, the number ofmacroblocks are evenly allocated in the refresh cycle. Therefore, theamount of codes is evenly dispersed. Unlike the case using the Ipictures, the amount of codes does not oscillate. This reduces thebuffer size and the image data can be used in a low-delay system.

In the above discussion, the case where the refresh cycle is ten framesis taken as an example. FIG. 8 shows a case where the refresh cycle isfifteen frames, i.e., N=15. In FIG. 8, a blank frame represents theframe including S intra macroblocks and a hatched frame represents theframe including (S+1) intra macroblocks. When R takes a number from 1 to14, how the frames each including (S+1) intra macroblocks are arrangedare shown in this figure.

It can be seen from FIG. 8 that the frames each including (S+1) intramacroblocks are evenly disposed. Some of the hatched frames, which aregiven the sign “A”, are the above-described frames A and the otherhatched frames which are given the sign “B” are the above-describedframes B. It can be seen that the hatched frames are evenly disposed andthe frames A are also evenly disposed.

<Variations>

In the first preferred embodiment, Case 5 or 6 is selected out of Cases1 to 6 shown in FIG. 3. This is a selection according to the purposethat the intra macroblocks are disposed in the spatial direction asevenly as possible and the amount of generated codes is made uniform.

This variation uses a method in which the intra macroblocks which areimportant for image quality are disposed in the first half of therefresh cycle wherever possible. This selection method is effective in acase where the code amount control is performed in a unit of GOP. In thecase where the code amount control is performed in a unit of GOP, bydisposing the intra macroblocks which are important for image quality inthe first half of the refresh cycle wherever possible, it is possible tosolve a problem that a certain amount of bits to be allocated to theintra macroblocks in the second half of the refresh cycle run short.This is because lack of bits to be allocated to the intra macroblockscauses the degradation in image quality.

In the case where this variation is adopted, the block countdetermination part 12 selects Case 2. Alternatively, the block countdetermination part 12 may select Case 3 on the basis of overalldetermination of the above Standard Rule 3 and the idea that the intramacroblocks should be disposed in the first half wherever possible.

Further, in the first preferred embodiment, after selecting Cases 5 and6, Case 6 is finally selected. This selection conforms to the idea ofthis variation that the intra macroblocks should be disposed in thefirst half wherever possible.

The Second Preferred Embodiment

In a second preferred embodiment, the arrangement of the intramacroblocks is determined by using a function. It is assumed herein thatthe current frame number is Y1 and the number of macroblocks in a linedirection is Y2. As expressed by Eq. 5, it is assumed that the quotientof Y1 divided by Y2 is Y3 and the remainder is Y4.

Y1/Y2=Y3 . . . Y4  (Eq. 5)

When Y4 is an even number, as expressed by Eq. 6, the half of Y4 isdetermined to be Y5.

Y5=Y4/2  (Eq. 6)

When Y4 is an odd number, Y5 is determined as expressed by Eq. 7, wherea fractional portion of Y4/2 is rounded down.

Y5=(Y2−1)−Y4/2  (Eq. 7)

Next, as expressed by Eq. 8, n-times (n is a constant) of a y coordinatemb_y (=0, 1, 2 . . . ) of a macroblock to be processed is added to Y5,and it is assumed that the quotient of a value obtained by the additiondivided by Y2 is Y6 and the remainder is Y7, where n is a positiveinteger.

(Y5+n×mb _(—) y)/Y2=Y6 . . . Y7  (Eq. 8)

After performing the above arithmetic operations, when an x coordinatemb_x (=0, 1, 2 . . . ) of the macroblock to be processed coincides withY7, the macroblock to be processed is determined to be an intramacroblock.

In the second preferred embodiment, by using a function, it can bedetermined whether to intra-code each macroblock. Since the intramacroblocks are dispersedly disposed in a frame, no degradation in imagequality is caused.

The image coding apparatus 1 of the second preferred embodimentcomprises no block count determination part 12 shown in FIG. 1. Theposition determination part 13 determines the frames in which the intramacroblocks are to be allocated and the position of each of the intramacroblocks in the frame.

FIGS. 9A to 9E are views showing the intra macroblocks arranged inaccordance with the second preferred embodiment. FIGS. 9A to 9E showframes with Nos. 0 to 4, respectively. In the figures, the hatchedmacroblocks represent intra macroblocks. In the second preferredembodiment, the positions of the intra macroblocks are not random butdetermined by using the above-discussed function.

In the second preferred embodiment, it is possible to differentiate themoving directions of the intra macroblocks between the even-numberedframes and the odd-numbered frames. When the intra macroblocks in allthe frames perform the same motion in the time direction, the intramacroblocks become noticeable and this causes degradation in imagequality. In accordance with the second preferred embodiment, it ispossible to give irregularity to the motions of the intra macroblocksand therefore improve the image quality.

While the invention has been shown and described in detail, theforegoing description is in all aspects illustrative and notrestrictive. It is therefore understood that numerous modifications andvariations can be devised without departing from the scope of theinvention.

1. An image coding apparatus, comprising: a block count determinationpart for determining the number of intra macro blocks to be included ineach frame; a position determination part for determining respectivespatial positions of said intra macroblocks to be included in said eachframe in said frame; and a coding part for arranging said intramacroblocks, the number of which is determined by said block countdetermination part, in said each frame on the basis of said positionsdetermined by said position determination part, to thereby performcoding, wherein said position determination part arranges said intramacroblocks to be included in said each frame at random positions insaid frame.
 2. The image coding apparatus according to claim 1, whereinone frame consists of M macroblocks and each of said macroblocks isintra-coded once in N frames, and said block count determination partdetermines the number of intra macroblocks to be allocated to said eachframe so that said M intra macroblocks evenly appear in said N frames.3. The image coding apparatus according to claim 2, wherein said blockcount determination part determines the number of intra macroblocks tobe allocated to said each frame so that the difference in the number ofintra macroblocks appearing in said each frame among said frames is atmost
 1. 4. The image coding apparatus according to claim 2, wherein saidblock count determination part allocates S intra macroblocks to eachframe when M is an integral multiple of N and it is assumed that thequotient of M divided by N is S, and said block count determination partallocates S intra macroblocks to each of (N−R) frames and allocates(S+1) intra macroblocks to each of R frames when M is not an integralmultiple of N and it is assumed that M divided by N gives S as aquotient, leaving R as a remainder.
 5. The image coding apparatusaccording to claim 4, wherein said block count determination partdisposes said frames each including (S+1) intra macroblocks at a rate ofone in D frames when N is an integral multiple of R and it is assumedthat the quotient of N divided by R is D, and said block countdetermination part disposes (R−Q) frames each including (S+1) intramacroblocks at an interval of D frames and disposes Q frames eachincluding (S+1) intra macroblocks at an interval of (D+1) frames when Nis not an integral multiple of R and it is assumed that N divided by Rgives D as a quotient, leaving Q as a remainder.
 6. The image codingapparatus according to claim 5, wherein said block count determinationpart mixedly arranges frames A which are disposed at an interval of(D+1) frames and frames B which are disposed at an interval of D framesamong R frames each including (S+1) intra macroblocks so that dispersionof frame interval of said frames A becomes as small as possible.
 7. Theimage coding apparatus according to claim 4, wherein said block countdetermination part arranges said intra macroblocks so that the ratio ofsaid intra macroblocks is higher in the first half of a GOP.
 8. An imagecoding apparatus, comprising: a position determination part fordetermining respective spatial positions of intra macroblocks to beincluded in each frame in said frame; and a coding part for arrangingsaid intra macroblocks in said each frame on the basis of said positionsdetermined by said position determination part, to thereby performcoding, wherein said position determination part arranges said intramacroblocks so that there is a difference in the motion of said intramacroblocks in a time direction between even-numbered frames andodd-numbered frames.